<?php
  define('CSS_JS_VERSION', '1.0.0');
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Language" content="pl" />
    <title>System premiowy i ocena pracownicza | Volkswagen Group Polska</title>
    <?php foreach ($this->cssFiles as $file): ?>
      <link href="<?php echo($file); ?>?ver=<?php echo CSS_JS_VERSION ?>" rel="stylesheet" media="screen">
    <?php endforeach; ?>
    <link rel="Shortcut icon" href="/favicon.ico?ver=1.1" />
  </head>
  <body>
    <div class="modal fade" id="modal" tabindex="-1" role="dialog" aria-labelledby="modalLabel" aria-hidden="true"></div>
    <div class="rightMenu">
      <span class="changeLang" data-lang="pl">PL</span>
      <span class="changeLang" data-lang="en">EN</span>
    </div>
    <div id="mainContainer">
      <div id="page">
        <div id="pageContent" class="center">
          <div id="head">
            <a id="headL" href="/"><span class="project-logo"></span></a>
            <a id="headR" href="http://vw-group.pl/"><span class="project-logo"></span></a>
            <div id="clock" class="right">
              <i class="fa fa-clock-o"></i>
              <div id="clockContent"></div>
            </div>
          </div>
          <div id="container">
            <div id="headContainer" class="stickable">
              <nav class="navbar navbar-default" role="navigation">
                <div class="container-fluid">
                  <div class="navbar-header">
                    <a id="gotoHome" class="navbar-brand" href="/"><span id="appTitle">System premiowy i ocena pracownicza</span></a>
                  </div>
                  <div id="userContainer"></div>
                </div><!-- /.container-fluid -->
              </nav>
              <div id="subtitleNavBar" class="subnav" style="display:none;"></div>
            </div>
            <div id="bodyContainer"></div>
          </div>
        </div>
      </div>
      <div id="foot">
        <div id="footHolder" class="center">
          <a id="footercreated" onclick="javascript:this.target='_blank';" title="Created by Gmind Software House" href="http://www.gmind.pl"></a>
            <p>
              © Volkswagen Group Polska 2014 | 
              <a onclick="javascript:this.target='_blank'" href="http://vw-group.pl/">www.vw-group.pl</a>
            </p>
            <p style="display: block; text-align: right; width: 960px;">
              PP <?php echo CSS_JS_VERSION ?>
            </p>
        </div>
        <div class="clearfix"></div>
      </div>
    </div>

    <div id="preloader" style="display: none;">
      <img src="/images/preloader.gif" />
      <div class="preloader-background"></div>
    </div>

    <?php require('/modules/empeval/js/templates/menu.php'); ?>
    <?php require('/modules/empeval/js/templates/login.php'); ?>
    <?php require('/modules/empeval/js/templates/nav.php'); ?>
    <?php require('/modules/empeval/js/templates/topBarSubtitle.php'); ?>
    <?php require('/modules/empeval/js/templates/positionList.php'); ?>
    <?php require('/modules/empeval/js/templates/positionListRow.php'); ?>
    <?php require('/modules/empeval/js/templates/bonusGroupList.php'); ?>
    <?php require('/modules/empeval/js/templates/bonusGroupListRow.php'); ?>
    <?php require('/modules/empeval/js/templates/bonusGoalsForm.php'); ?>
    <?php require('/modules/empeval/js/templates/bonusGoalsKpiRow.php'); ?>
    <?php require('/modules/empeval/js/templates/bonusGoalsTaskRow.php'); ?>
    <?php require('/modules/empeval/js/templates/bonusGoalsForm2.php'); ?>
    <?php require('/modules/empeval/js/templates/reports.php'); ?>
    <?php require('/modules/empeval/js/templates/formList.php'); ?>
    <?php require('/modules/empeval/js/templates/formListRow.php'); ?>
    <?php require('/modules/empeval/js/templates/myFormList.php'); ?>
    <?php require('/modules/empeval/js/templates/myFormListRow.php'); ?>
    <?php require('/modules/empeval/js/templates/dialogMessage.php'); ?>
    <?php require('/modules/empeval/js/templates/dialogBonusGroup.php'); ?>
    <?php require('/modules/empeval/js/templates/managementByObjectiveForm.php'); ?>
    <?php require('/modules/empeval/js/templates/managementPerformanceEvaluation.php'); ?>
    <?php require('/modules/empeval/js/templates/managementDialogueSummary.php'); ?>
    <?php require('/modules/empeval/js/templates/mboTableFunctionRow.php'); ?>
    <?php require('/modules/empeval/js/templates/mboTablePersonalRow.php'); ?>
    <?php require('/modules/empeval/js/templates/rejectionList.php'); ?>
    <?php require('/modules/empeval/js/templates/rejectionListRow.php'); ?>
    <?php require('/modules/empeval/js/templates/dialogSendDecision.php'); ?>
    <?php require('/modules/empeval/js/templates/dialogSendRejection.php'); ?>
    <?php require('/modules/empeval/js/templates/dialogUnaccept.php'); ?>
    <?php require('/modules/empeval/js/templates/browserError.php'); ?>

    <?php foreach ($this->jsFiles as $file): ?>
      <script type="text/javascript" src="<?php echo($file); ?>?ver=<?php echo CSS_JS_VERSION ?>"></script>
    <?php endforeach; ?>
    
    <script type="text/javascript">
      var browserMajorVersion = function() {
        return parseInt($.browser.version.slice(0, $.browser.version.indexOf('.')), 10);
      }
      if ($.browser.msie && browserMajorVersion() < 9 || $.browser.chrome && browserMajorVersion() < 30 || $.browser.mozilla && browserMajorVersion() < 18 && browserMajorVersion() != 11) {
          $("#clockContent").clock();
          $('#bodyContainer').html($('#browserErrorTemplate').html());
      } else {
        var IP = '<?php echo $_SERVER['REMOTE_ADDR']; ?>';
        var lang = '';
        var segments = window.location.pathname.split('/');
        var rootPath = '<?php echo $this->rootPath; ?>';
        segments.shift();
        if (rootPath != '')
            segments.shift();
        if (segments[0] != undefined) {
          var lang = segments[0];
        }
        if (lang != '') {
          if (LANGUAGES.indexOf(lang) == -1) {
            lang = DEFAULT_LANGUAGE;
          }
        } else {
          lang = DEFAULT_LANGUAGE;
        }
        var router = new APP.Routers.MainRouter({language: lang});
      }
    </script>
  </body>
</html>
